<?php
//包含网站配置文件
include '../public/webconfig.php';

//如果网站关闭  则跳转到关闭页面
//进行判断 如果网站关闭 跳转到关闭页面
if(WZ_KG == 2){
	header('location:./weihu.php');
	exit();
}

		//包含头部  如果登录成功跳转  否则不跳转  还是原登录框头部页面
		session_start();
		if($_SESSION['isLogin'] != 1){
			include './header.php';
			
			
		}else{
			include './top.php';
		}
		
//包含数据库配置文件
include '../public/dbconfig.php';
//包含函数库文件
include '../public/func.inc.php';
$link = conn();
//var_dump($link);
?>

		
		<div class="two">
			<div class="luntan">论坛</div>
			<div class="daohang">导航论坛<select name=""><option value="1"></option><option value="2"></option></select></div>
		</div>	
		<div class="sousuo">
				<a href="" style="padding-left:20px;"><input type="text" name="text" placeholder="请搜索内容"></a>
				<a href=""><select><option value="帖子">帖子</select></a>
				<a href="" style="color:black;font-size:20px;">热搜</a>
				<a href="" style="color:blue;">活动</a>
				<a href="" style="color:blue;">交友</a>
				<a href="" style="color:blue;">discuz</a>
		</div>
		<div class="kpath">
		<div id="path">
				  <a href="" class="index"></a>
				  <em></em><img src="./resource/images/2016-11-03_153452.jpg">
				  <a href="" class="path_menu">论坛</a>
		</div>
				</div>
		<div class="ktip">
			<div id="tip">
				
				</div>
				<div id="count">
				  <img src="./resource/images/2016-11-03_153452.jpg">今日: <em>1520</em>
				  <span class="pipe">|</span>
				  昨日: <em>1520</em>
				  <span class="pipe">|</span>
				  帖子: <em>1520</em>
				  <span class="pipe">|</span>
				  会员: <em>1520</em>
				  <span class="pipe">|</span>
				  欢迎新会员: <em><a href=""><?php session_start(); echo $_SESSION['uname'];?></a></em>
				</div>
				
				
			</div>
		</div>
		<?php
		//----------查询所有分区---------------
		$sql = "select id,pname from bbs_part";
		$res = mysqli_query($link,$sql);
		if($res){
			while($pinfo = mysqli_fetch_assoc($res)){
			
		
		
		?>
		
		
		
		
		<div class="morenbankuai">
                  <div class="four">版主:<a href="">哈哈</a></div>
                  <div class="three">
				  <img src="./resource/images/forum_new.gif" title="Discuz!程序发布" /><?php echo $pinfo['pname'];?>：<a href=""></a></div>
				  </div>
		</div>
		
		<?php
				//----------查询分区下版块-----------
				$csql = "select id,cname,pid from bbs_cate where pid={$pinfo['id']}";
				$cres = mysqli_query($link, $csql);
				if($cres){
					while($cinfo = mysqli_fetch_assoc($cres)){
						
						
						session_start();
						$_SESSION['id'] = $cinfo['id'];
						//var_dump($_SESSION['id']);
						//exit;
		
		?>
		
		<div class="bankuai"><img src="./resource/images/forum_new.gif" title="Discuz!程序发布" />
		<a href="list.php?id=<?php echo $cinfo['id'];?>"><?php echo $cinfo['cname']?>:</a><em>主题 54</em>
                            <em>帖子：244</em>
		<a href="list.php">最后发表: 2012-11-1 10:22</a>
		</div>
		<?php
					}
				}
		?>
		<?php
		}
		}
		?>
		
			
			<div class="five" style="margin-top:10px;">
				在线会员 0人在线 0会员(0隐身), 0位游客 最高纪录是于2015-6-15.
			</div>
			<div class="six">
				<div class="senven">
					<ul>
						<li><img src="./resource/images/2016-10-29_003246.jpg"><a href="">管理员</a></li>
						<li><img src="./resource/images/2016-10-29_003303.jpg"><a href="">超级版主</a></li>
						<li><img src="./resource/images/2016-10-29_003314.jpg"><a href="">版主</a></li>
						<li><img src="./resource/images/2016-10-29_003340.jpg"><a href="">会员</a></li>
					</ul>
				</div>
				
			<div class="eight"><a href="">当前只有游客或隐身会员在线</a></div>
			</div>
			<?php
			 $fsql = "select id,title,pic,url,descript from bbs_fri";
			 $fres = mysqli_query($link,$fsql);
			 if($fres){
				 while($finfo = mysqli_fetch_assoc($fres)){
					 
					 
			?>
			<div class="nine">
				<div class="shi" >
					<div style="float:left;">
					<a href="<?php echo $finfo['url'];?>"><img src="../uploads/<?php echo $finfo['pic'];?>" width="85" height="37"></a>
					<ul style="border:1px dashed #C1D4E2 float:left;">
					</div>	
						<li style="padding-left:70px;"><a href="<?php echo $finfo['url'];?>"><?php echo $finfo['title'];?></a></li>
						<li style="padding-left:70px;"><a href="<?php echo $finfo['url'];?>"><?php echo $finfo['descript'];?></a></li>
					</ul>
				</div>
				<div class="ten">
				<a href="<?php echo $finfo['url'];?>"style="padding:30px;">omsenz</a>
				<a href="<?php echo $finfo['url'];?>"style="padding:30px;">漫游平台</a>
				<a href="<?php echo $finfo['url'];?>"style="padding:30px;">Yeswan</a>
				<a href="<?php echo $finfo['url'];?>"style="padding:30px;">专用主机</a>
			
			
				</div>
			</div>

			<?php
					
				 }
			 }
			?>
			
			
			
			
			<?php
			include './footer.php';
			
			?>
			
	
<?php
if(isset($_GET['error'])){
	switch($_GET['error']){
		case 1:
			echo '用户名错误';
			break;
		case 2:
			echo '密码错误';
			break;
		
	}
}


?>







</html>